package com.seer.seertest.scheduler;

import com.seer.seertest.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class OrderScheduler {

    @Autowired
    private OrderService orderService;

//    @Scheduled(cron = "0 0 2 * * ?")
    @Scheduled(cron = "0 */1 * * * ?")
    public void runOrderTask() {
        orderService.processOrders();
    }

}
